<div id="adminPage">

   <h2>Edit User</h2>
   <p>{$result}</p>
   <br/>
   <form action = "edituser.php" method = "post">
   	<table border = 0>
		
		<tr class="field">
			<td><label size="15">First name: </label><input type = "text" name = "fname" value = "{$user_fname}" size="15"/></td>
			<td>
				{if $errorfname}
					{$errorfname}
				{/if}
			</td>
		</tr>
		
		<tr class="field">
			<td><label>Last name: </label><input type = "text" name = "lname" value = "{$user_lname}" size="15"/></td>
			<td>
				{if $errorlname}
					{$errorlname}
				{/if}
			</td>
		</tr>
		
		<tr class="field">
			<td><label class="lblEmail">Email: </label>
			<input type = "text" name = "email" value = "{$user_email}" size="15"/></td>
			<td>
				{if $erroremail}
					{$erroremail}
				{/if}				
			</td>
		</tr>
		
		<tr class="field">
			<td>
			<label>Role: </label>
			<select name = "role">
				<option value = "{$user_role}" selected = "selected">{$user_role}</option>
				<option value = "{if $user_role eq "admin"}user{else}admin{/if}">{if $user_role eq "admin"}user{else}admin{/if}</option>
			</select>
			</td>
		</tr>
   	</table>
	<br/>
	
   	<input type = "hidden" name = "user_id" value = "{$user_id}">
   	<input type = "submit" name = "submit" value = "Save User"/>
   	<input type = "submit" name = "submit" value = "Cancel"/>
   </form>

</div>